Hoare logic for multistaged programs

نویسندگان

  • Kwangkeun Yi
  • Cristian Gherghina
چکیده

In this work we present a straight forward extension of Hoare logic that caters for multistaged programs. We have chosen a minimalist support language which allowed us to focus on the issues pertaining to the staged features. Similarly, the support logic is a simple, staged, first order logic with equality assertions. We allow the equality assertions to contain descriptions of staged code in the form of pre post conditions which are in turn expressed as formulas in our logic. We formulate Hoare rules for each of the language constructs. Furthermore we prove the rules sound with respect to an intuitive semantic of our staged language. The formalization is done in Coq, proofs are available at: http://www.comp.nus.edu.sg/ cristian/projects

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Logic for Formal Verification of Quantum Programs

This paper provides a Hoare-style logic for quantum computation. While the usual Hoare logic helps us to verify classical deterministic programs, our logic supports quantum probabilistic programs. Our target programming language is QPL defined by Selinger, and our logic is an extension of the probabilistic Hoare-style logic defined by den Hartog. In this paper, we demonstrate how the quantum Ho...

متن کامل

ar X iv : 0 90 6 . 45 86 v 1 [ qu an t - ph ] 2 5 Ju n 20 09 Hoare Logic for Quantum Programs ∗

Hoare logic is a foundation of axiomatic semantics of classical programs and it provides effective proof techniques for reasoning about correctness of classical programs. To offer similar techniques for quantum program verification and to build a logical foundation of programming methodology for quantum computers, we develop a full-fledged Hoare logic for both partial and total correctness of q...

متن کامل

Reasoning About States of Probabilistic Sequential Programs

A complete and decidable propositional logic for reasoning about states of probabilistic sequential programs is presented. The state logic is then used to obtain a sound Hoare-style calculus for basic probabilistic sequential programs. The Hoare calculus presented herein is the first probabilistic Hoare calculus with a complete and decidable state logic that has truth-functional propositional (...

متن کامل

Formalized Proof of Type Safety of Hoare Type Theory

We prove type safety of the Hoare Type Theory (HTT), an extension of Separation Logic and Hoare Logic to higher-order functional programs. Our proof is rather simple and is based on subject reduction, unlike previous work on HTT by Birkedal et al., which uses nontrivial denotational semantics. Further, we formalized our proof in the Coq theorem prover. This formalization can be seen as a basis ...

متن کامل

Reasoning about probabilistic sequential programs 1

A complete and decidable Hoare-style calculus for iteration-free probabilistic sequential programs is presented using a state logic with truth-functional propositional (not arithmetical) connectives.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011